package com.wutao.panzh.admin.mapper;

import com.panzh.entity.InformationItem;
import com.panzh.entity.index.IndexInformationItem;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
/*
全部都继承mapper，通用mapper，实现了方法的封装；
 */
public interface InformationItemMapper extends Mapper<InformationItem> {

    //@Param("key")该注解在mapper的xml 文件中可以进行引用key；
    InformationItem selectInformationItemByKey(@Param("key")Integer key);

    List<InformationItem> selectFroSearch(@Param("keyWord")String keyWord);

    String selectImagSrcByInformationItemId(@Param("informationItemId") String informationItemId);

    void insertImagSrcByInformationItemId(@Param("imagSrc") String imagSrc,@Param("informationItemId") String informationItemId);

    void updateImagSrcByInformationItemId(@Param("imagSrc") String imagSrc,@Param("informationItemId") String informationItemId);

    //删除大图
    void deleteInformationImage(@Param("informationId")String informationId);

    //index前端页面相关；
    List<IndexInformationItem> selectIndexInformationFroSearch();
}